package com.zhang.network.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhang.dto.BaseResponse;
import com.zhang.network.constant.BizResponse;
import com.zhang.network.model.User;
import com.zhang.network.model.recommend.IntelligentRecommendVO;
import com.zhang.network.model.recommend.RecommendVO;
import com.zhang.network.service.FriendService;
import com.zhang.network.service.IntelligentRecommendService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/intelligent")
public class IntelligentRecommendController {

    @Resource
    IntelligentRecommendService intelligentRecommendService;

    @GetMapping("/recommend")
    public BaseResponse<List<IntelligentRecommendVO>> intelligentRecommend(User user) {
        log.info("智能推荐");
        List<IntelligentRecommendVO> recommends = intelligentRecommendService.intelligentRec(user);
        return BizResponse.success(recommends);

    }
}
